package com.dycong.common.reflect.aop.property;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * Created by dycong on 2016/12/12.
 */
public class GreetingAspect {

    public void around(ProceedingJoinPoint pjp) throws Throwable {
        before();
        //Object[] objects=new Object[]{"girl","A3"};
        //Object result = pjp.proceed(objects);
        Object result = pjp.proceed();
        after();
    }

    public void doSthBefore(){
        System.out.println("this is the before AOP");
    }

    public void doSthAfter(){
        System.out.println("this is the doSthAfter AOP");
    }

    public void doSthAfterThrowing(){
        System.out.println("this is the doSthAfterThrowing AOP");
    }

    public void doSthAfterReturn(){
        System.out.println("this is the doSthAfterReturn AOP");
    }

    private void before() {
        System.out.println("do somethings Before");
    }

    private void after() {
        System.out.println("do somethings After");
    }
}
